package org.aphelie.romancer.ui.wizards;

import org.aphelie.romancer.ui.ChronicleUIPlugin;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

public class DocumentNewWizard extends Wizard implements INewWizard {
	
	private ISelection selection;
	private IWorkbench workbench;
	
	private DocumentNewFilePage filePage;

	/**
	 * Constructor for AtrResourceDocumentWizardNew.
	 */
	public DocumentNewWizard() {
		super();
		setNeedsProgressMonitor(true);
	}

	@Override
	public void init(IWorkbench workbench, IStructuredSelection selection) {
			this.workbench = workbench;
			this.selection = selection;
			setWindowTitle(ChronicleUIPlugin.getInstance().getString("_UI_Wizard_label"));
//			setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ChronicleEditorPlugin.INSTANCE.getImage("full/wizban/NewChronicle")));
	}
	
	public void addPages() {
		addCreationPage();
	}
	
	private void addCreationPage() {
		if (filePage == null) {
			filePage = new DocumentNewFilePage(
					"Creta Page Name", (IStructuredSelection) selection);
		}
		addPage(filePage);
	}

	@Override
	public boolean performFinish() {
		// TODO Auto-generated method stub
		return false;
	}

}
